package com.hliu.core.service;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.SQLQuery;

import java.io.Serializable;
import java.util.List;

/**
 * author: 6
 * date: 13-4-8
 */
public interface IBaseHibernateService<T extends Serializable, PK extends Serializable> {
	public T get(PK id);

	public T load(PK id);

	public void save(T t);

	public void update(T t);

	public List<T> list();

	public void saveOrUpdate(T t);

	public void delete(T t);

	public void del(PK id);

	public SQLQuery createSQLQuery(String queryString);

	public Criteria createCriteria();

	public Query createQuery(String queryString);
}
